<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META http-equiv="Content-Type" content="text/html; charset=utf-8">
  <style>
  body{font: normal 14pt Arial; color: navy; margin: 30 100}
  table{border-collapse:collapse; border: solid 2px green}
  td{border: solid 1px grey;font: normal 14pt Arial; color: navy;padding: 2 10}
  .button{font: normal 14pt Arial; color: navy;width:100px}
  </style>

 </HEAD>

 <BODY>
<?php
include("connect.inc");
include("tool.inc");
$ms="S01";
$tensv=is_student($ms);
$sql="select * from kq,hp where kq.maso='$ms' and left(kq.malhp,3)=hp.mahp";
mysql_query("SET NAMES 'utf8'");
$rs=mysql_query($sql,$con);
if(mysql_num_rows($rs)>0){ 
	echo "<h3>Bảng điểm của sinh viên: <span style='color:red'>$tensv</span></h3>";
?>
	<table>
	<tr>
		<td style="text-align:center">TT</td>
		<td style="text-align:center">Mã HP</td>
		<td style="text-align:center">Tên học phần</td>
		<td style="text-align:center">Tín chỉ</td>
		<td style="text-align:center">Điểm</td>
	</tr>
<?php
	$tt=1;
	while($row=mysql_fetch_array($rs)){
?>
		<tr>
			<td style="text-align:center"><?php echo $tt;?></td>
			<td style="text-align:center"><?php echo $row["mahp"];?></td>
			<td><?php echo $row["tenhp"];?></td>
			<td style="text-align:center"><?php echo $row["tinchi"];?></td>
			<td style="text-align:right"><?php echo number_format(($row["diem"]+0),2,",","");?></td>
		</tr>
<?php
	$tt++;
	}
	echo "</table>";
}
else echo "Record not found!";
mysql_free_result($rs);
mysql_close($con);
?>
 </BODY>
</HTML>